package commons;
import java.io.File;
import java.io.FileFilter;

public class OpenDocumentFileFilter implements FileFilter 
{
	private static final String[] extensions = {".odt", ".fodt", ".ods", ".fods", ".odp", ".fodp", ".odb", ".odg", ".fodg", ".odf"};

	public boolean accept(File pathname) 
	{	int i = 0;
		boolean found = false;
		while (i < extensions.length && !found) 
		{	if (pathname.getName().endsWith(extensions[i]))
			{	found = true;	
			} else 
			{	i++;
			}
		}
		return found;
	}
}
